<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>行政区划归属获取</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<script type="text/javascript" src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript">
    login1();
    function login1() {
        $.ajax({
            url: "/getImageVerifyCode",
            data: {name: 'jenny'},
            type: "GET",
            //dataType: "json",
            success: function(data) {
                //alert(data.bigImage);
                //alert(data.smallImage);
                //alert(data.yHeight);
                document.getElementById("test1").src="data:image/jpg;base64,"+data.bigImage;
              //  $("#test1").src="data:image/jpg;base64,"+data.bigImage;
                document.getElementById("test2").src="data:image/jpg;base64,"+data.smallImage;
            }
        });
    }

    function login2() {
        $.get(
            "{{ url_for('greet') }}",
            {name: 'Brad'},
            function(data) {
                $("#ret").text(data.result);
            },
            "json"
        );
    }

    function login3() {
        $.getJSON(
            "{{ url_for('greet') }}",
            {name: 'jenny'},
            function(data) {
                $("#ret").text(data.result);
            }
        );
    }

    function login4() {
        $.post(
            "{{ url_for('greet') }}",
            {name: 'Brad'},
            function(data) {
                $('#ret').text(data.result);
            },
            "json"
        );
    }



</script>
<body>
<div style="float: left" id="aaa">
    <img id="test1"  alt="抠图">
    <img  style="margin-top: 229px" id="test2"  alt="带抠图阴影的背景">
</div>
</body>

</html>